// 节点图标
import nullBox from '@/assets/icon/null.png'
import Ip from '@/assets/icon/bin_ip.png'
import china from '@/assets/images/china.png'
import ipPort from '@/assets/icon/ip_port.png'
import ipCertificate from '@/assets/icon/bin_ip_certificate.png'
import webIcon from '@/assets/icon/web_icon.png'
import htmlIcon from '@/assets/icon/icon_hash.png'
import domain from '@/assets/icon/domain.png'
import ipv4 from '@/assets/icon/ipv4.png'
import ipv6 from '@/assets/icon/ipv6.png'
// 节点样式
export const nodeStyles = {
  Host: {
    outerCircle: { r: 30, fill: '#d7dae0', opacity: 0.5 },
    innerCircle: { r: 20, stroke: '#5b5b5b', strokeWidth: 1, fill: '#fff' },
    text: { dy: 40 },
    image: { width: 35, height: 35, x: -17.5, y: -17.5 }
  },
  Host_active: {
    outerCircle: { r: 30, fill: '#bcc1cc', opacity: 0.5 },
    innerCircle: { r: 20, stroke: '#5b5b5b', strokeWidth: 1, fill: '#fff' },
    text: { dy: 40 },
    image: { width: 35, height: 35, x: -17.5, y: -17.5 }
  },
  Leader: {
    innerCircle: { r: 18, stroke: '#5b5b5b', strokeWidth: 1, fill: '#fff' },
    text: { dy: 40 },
    image: { width: 25, height: 25, x: -12.5, y: -12.5 }
  },
  Leader_active: {
    innerCircle: { r: 18, stroke: '#5b5b5b', strokeWidth: 1, fill: '#d0d0d9' },
    text: { dy: 40 },
    image: { width: 25, height: 25, x: -12.5, y: -12.5 }
  },
  Members: {
    innerCircle: { r: 18, fill: '#fff' },
    image: { width: 25, height: 25, x: -12.5, y: -12.5 }
  },
  Members_active: {
    innerCircle: { r: 18, fill: '#d0d0d9' },
    image: { width: 25, height: 25, x: -12.5, y: -12.5 }
  }
}
// 节点字段配置
export const nodeConfig ={
    nodeId: '',//唯一id
    name: '',//显示标签
    node_type: '',//节点类型
    group_type: '',//筛选组
    group: '',//样式组
    icon:'' ,//图标
    leavel: '',//层级
    sourceID: '',//父节点
    originIP:'',//最初节点
    XandY:false,//是否获得坐标
    expand: false,//是否全部展开
    childID:[],//子节点id集
    carriedInfo:{} //携带信息
}
// 节点类型映射表
export const NodeTypeMap = {
  PORT: 'port',
  CERTIFICATE: 'certificate',
  HTML_FAVICON: 'html_favicon',
  HTML_TITLE: 'html_title'
}
// 节点图标映射表
export const NodeIconMap = {
  CHINA:china,
  PORT: ipPort,
  CERTIFICATE: ipCertificate,
  HTML_FAVICON: htmlIcon,
  HTML_TITLE: webIcon,
  ipv4: ipv4,
  ipv6: ipv6,
  domain: domain,
  ip: Ip,
}
